package com.seventh.parkingrent.service;

import com.seventh.parkingrent.controller.form.PasswordForm;
import com.seventh.parkingrent.controller.form.UserForm;
import com.seventh.parkingrent.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author Lucas
 * @since 2021-08-24
 */
public interface IUserService extends IService<User> {

public User login(String username,String password);

    User getUserById(Integer id);

    //邮箱验证
    public User findEmail(String email);

    //用户注册
    public boolean registerUser(UserForm userForm) throws Exception;

    //处理点击激活邮箱
    public boolean updateState(String email);

    boolean updatebalance(double v,Integer id);
    //修改用户密码
    public boolean updatePassword(PasswordForm passwordForm) throws UnsupportedEncodingException, NoSuchAlgorithmException;

    //查询余额
    public User findBalance(int userId);

    public User findIdcard(String idcard);

}
